import http from "../request.js";

const header = { "Content-Type": "application/x-www-form-urlencoded" };
const jsonHeader = { "Content-Type": "application/json" };

class HomeCenter {
  constructor() {
    this.homelist_Api =             "/api/hqshop/category/homelist";        // 首页分类
		
    this.getTjUI_Api =              "/api/hqshop/goods/getTjUi";            // 首页精选好物UI
    this.getTjGoods_Api =           "/api/hqshop/goods/getTjGoods";         // 首页精选好物
		
		
    this.category_list_Api =        "/api/hqshop/goods/category_list";      // 首页平台商品搜索
    this.merchIndexApi = "/api/hqmerch/merch/index"; //商户搜索
  
  }
  getHomeList(params) { // 首页分类
    return http.post(this.homelist_Api, params || {}).then((res) => res.data);
  }
	
	
	
	getTjUI(params) {  // 首页精选好物UI
	  return http.post(this.getTjUI_Api, params || {}).then((res) => res.data);
	}
	getTjGoods(params) {  // 首页精选好物
	  return http.post(this.getTjGoods_Api, params || {}).then((res) => res.data);
	}

  getCategoryList(params) {
    return http.post(this.category_list_Api, params || {}).then((res) => res.data);
  }
  getMerchIndex(params) {
    return http.post(this.merchIndexApi, params || {}).then((res) => res.data);
  }
}

export const HomeCenterApi = new HomeCenter();
